import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
//@ts-expect-error
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'

import router from '@/router'
import store from '@/store'
import App from './App.vue'
import gloablComponent from '@/components/index'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import 'element-plus/theme-chalk/dark/css-vars.css'
const app = createApp(App)

//引入element-plus
app.use(ElementPlus, {
  locale: zhCn,
})
app.use(store)
import 'virtual:svg-icons-register'
app.use(gloablComponent)
app.use(router)
import '@/styles/index.scss'
app.mount('#app')
//全局注册图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
